<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../JS/react.development.js"></script>
    <script src="../../JS/react-dom.development.js"></script>
    <script src="../../JS/babel.min.js"></script>
</head>
<body>
    <div id="root"></div>

    <script type="text/babel">
        class Input extends React.Component {
            constructor(props) {
                super(props);
                this.state = {iNum: 10}
            }

            fnChange(ev) {
                this.setState({
                    iNum: ev.target.value
                })
            }

            render() {
                return(
                    <div>
                        <p>{this.state.iNum}</p>
                        <input type="text" value={this.state.iNum} onChange={this.fnChange.bind(this)}/>
                    </div>
                );
            }
        }

        ReactDOM.render(<Input />, document.getElementById('root'));
    </script>
</body>
</html>